from selenium.webdriver.common.by import By
from common.base import Base
from common.functions import open_browser


class LoginPage(Base):
    log_url = 'http://139.129.26.163/admin/privilege.php?act=login'

    def login_username(self, username):
        self.send_keys((By.NAME, 'username'), username)

    def login_password(self, password):
        self.send_keys((By.NAME, 'password'), password)

    def login_click(self):
        self.click((By.CLASS_NAME, 'btn-a'))


if __name__ == '__main__':
    browser = open_browser()
    log = LoginPage(browser)
    # log.get(LoginPage.log_url)
